<?php
class personal_model extends jqxGrid_CI_Model {

    function __construct()
    {
        parent::__construct();
        
    }
    function binding(){
        $strQuery="
            SELECT SQL_CALC_FOUND_ROWS `tbl_personal`.*
            FROM `tbl_personal`
                
            ";
        $strWhere="
            WHERE  true
            ";
        $strOrderBy="Order By tbl_personal.`Insert` DESC ";
        $strGroupBy="";
        $config=array(
            "strQuery"=>$strQuery,
            "strWhere"=>$strWhere,
            "strOrderBy"=>$strOrderBy,
            "strGroupBy"=>$strGroupBy,
            "usingLimit"=>true,
            "fields"=>array(
                
            ),
            "datefields"=>array()
        );
        $this->init($config);
        return $this->jqxBinding();
    }
    function binding_commercial(){
        $strQuery="
            SELECT SQL_CALC_FOUND_ROWS `tbl_commercial`.*
            FROM `tbl_commercial`
                
            ";
        $strWhere="
            WHERE  true
            ";
        $strOrderBy="Order By tbl_commercial.`Insert` DESC ";
        $strGroupBy="";
        $config=array(
            "strQuery"=>$strQuery,
            "strWhere"=>$strWhere,
            "strOrderBy"=>$strOrderBy,
            "strGroupBy"=>$strGroupBy,
            "usingLimit"=>true,
            "fields"=>array(
                
            ),
            "datefields"=>array()
        );
        $this->init($config);
        return $this->jqxBinding();
    }
    function binding_book_tour(){
        $strQuery="
            SELECT SQL_CALC_FOUND_ROWS `tbl_reg`.*,`tbl_tour`.Title
            FROM `tbl_reg`
                LEFT JOIN `tbl_tour` ON ( `tbl_tour`.`ID` = `tbl_reg`.`Tour` )
            ";
        $strWhere="
            WHERE  true
            ";
        $strOrderBy="Order By `tbl_reg`.`Insert` DESC ";
        $strGroupBy="";
        $config=array(
            "strQuery"=>$strQuery,
            "strWhere"=>$strWhere,
            "strOrderBy"=>$strOrderBy,
            "strGroupBy"=>$strGroupBy,
            "usingLimit"=>true,
            "fields"=>array(
                
            ),
            "datefields"=>array()
        );
        $this->init($config);
        return $this->jqxBinding();
    }
}
?>
